<template>
<div>
   <el-form :inline="true">
     <el-form-item >
        <el-button
          type="primary"
          @click="flush"
          icon="export"
        >重新汇总</el-button>
      </el-form-item>
    </el-form>
  <BrowseDataList :cate="cate" :cols="cols" :single="true" :name="name" />
</div>
</template>
<script>
import BrowseDataList from "@/components/BrowseDataList";
import { setSaveAfter2019 } from "@/api/案例分析.js";
import { showLoading, hideLoading } from "@/utils/loading"
import { getUser } from "@/utils/auth";

import { getSsmzjsqk } from "@/api/少数民族情况.js";
import { getAlfx } from "@/api/案例分析.js";
import linq from "linq"
export default {
  components: {
    BrowseDataList
  },
  data() {
    return {
      cate: "11.4 少数民族教师情况",
      name:"11.4 少数民族教师情况",
      cols: [
        {label:"教师总数(人)",prop:"JSZS"},
        { label: "少数民族教师", prop: "SSMZJS" ,data:[
            {label:'合计(人)',prop:'SSMZJSZS'},
            { label: "比例(%)", prop: "SSMZJSZSBL" },
            { label: "校内专任教师(人)", prop: "SSMZXNZRJSZS" },
            {label:'比例(%)',prop:'SSMZXNZRJSZSBL'},
            { label: "校内兼职教师(人)", prop: "SSMZXNJKJSZS" },
            { label: "比例(%)", prop: "SSMZXNJKJSZSBL" }
        ]},
      ]
    };
  },
   
  methods: {
    async flush() {
    try {
      showLoading();
      var user = getUser();
      await setSaveAfter2019(user.XXID, user.CJPC);
      hideLoading();
    } catch (e) {
      this.$alert(e);
    }
  }
  }
};
</script>
<style>
</style>